package com.peanutcar.service.impl;

import com.peanut.dto.TabSeckillOrderDTO;
import com.peanutcar.service.GasolineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GasolineServiceImpl implements GasolineService {


    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public List<TabSeckillOrderDTO> getListGasoline() {
        //去redis中查询数据
        List<TabSeckillOrderDTO> TabGasolineDTOList = redisTemplate.boundHashOps("gasoline_key").values();
        return TabGasolineDTOList;
    }


}
